package cn.cy.creation.factorymethod.pattern;

/**
 * @author yangxq
 * @desc
 * @date 2025-05-13
 */
public class PatternClient {

    public static void main(String[] args) {
        ShapeFactory circleFactory = new CircleFactory();
        Shape shape1 = circleFactory.createShape();
        shape1.draw();  // 输出: Drawing Circle

        ShapeFactory squareFactory = new SquareFactory();
        Shape shape2 = squareFactory.createShape();
        shape2.draw();  // 输出: Drawing Square
    }

}
